async function wait (time) {
    await sleep2(time);
    fun();
}

wait(3000);